<template>
	<view>
		<uni-search-bar cancelButton="none" radius="20" @focus="focus"></uni-search-bar>
		<uni-notice-bar style="margin-bottom: 0;" :speed='70' showClose showIcon single scrollable :text="text"></uni-notice-bar>
		<uni-swiper-dot class="uni-swiper-dot-box" @clickItem="clickItem" :info="info" :current="current" :mode="mode" :dots-styles="dotsStyles" field="content">
			<swiper autoplay circular class="swiper-box" @change="change" :current="swiperDotIndex">
				<swiper-item v-for="(d, index) in info" :key="index">
					<view class="swiper-item" :class="'swiper-item' + index"><image mode="aspectFill" :src="d.url" style="width: 100%;"></image></view>
				</swiper-item>
			</swiper>
		</uni-swiper-dot>

		<uni-stitle :title="'天使映象'" :padding="true" :url="'/pages/find/find'" :background="'#f5f5f5'"></uni-stitle>
		<view>
			<scroll-view class="scroll-view_H" scroll-x="true">
				<view class="special-item" v-for="d in specialList" :key="d.id" >
					<view class="title">{{ d.title }}</view>
					<view class="titleTwo">{{ d.titleTwo }}</view>
					<image mode="aspectFill" class="speimg" :src="d.imgspecial"></image>
				</view>
			</scroll-view>
		</view>
		
		<uni-stitle :title="'蔚薰衣草'" :padding="true" :url="'/pages/find/find'" :background="'#f5f5f5'"></uni-stitle>
		<view>
			<scroll-view class="scroll-view_H" scroll-x="true">
				<view class="special-item" v-for="d in intelligenceList" :key="d.id" >
					<view class="title">{{ d.title }}</view>
					<image mode="aspectFill" class="speimg" :src="d.imgspecial"></image>
				</view>
			</scroll-view>
		</view>

		<uni-stitle :title="'蔚游乐区'" :padding="true" :url="'/pages/find/find'" :background="'#f5f5f5'"></uni-stitle>
		<view>
			<scroll-view class="scroll-view_H" scroll-x="true">
				<view class="intelligence-item" v-for="d in shuList" :key="d.id">
					<view class="title">{{ d.title }}</view>
					<image mode="aspectFill" class="speimg" :src="d.imgspecial"></image>
				</view>
			</scroll-view>
		</view>

		<uni-stitle :title="'家庭合照'" :padding="true" :background="'#f5f5f5'" :btnText="'全部'"></uni-stitle>
		<view class="imgbox"><image mode="aspectFill" :src="imgNotice" class="img" /></view>

		<uni-stitle :title="'告白气球'" :padding="true" :url="'/pages/find/find'" :background="'#f5f5f5'"></uni-stitle>
		<view>
			<scroll-view class="scroll-view_H" scroll-x="true">
				<view class="intelligence-item" v-for="d in wanList" :key="d.id" >
					<view class="title">{{ d.title }}</view>
					<image mode="aspectFill" class="speimg" :src="d.imgspecial"></image>
				</view>
			</scroll-view>
		</view>

		<uni-stitle :title="'发现更多'" :padding="true" :background="'#f5f5f5'"></uni-stitle>
		<view>
			<uni-list style="padding-top: 20rpx;">
				<uni-list-item v-for="d in moreList" :key="d.id" :border="false">
					<template v-slot:header>
						<image style="min-width:110rpx;width: 110rpx;height:110rpx;border-radius: 16rpx; margin:-14rpx 14rpx -14rpx -10rpx" :src="d.imgspecial" mode="aspectFill"></image>
					</template>
					<template v-slot:body>
						<view class="" style="width:560rpx;display: flex;flex-direction: column;">
							<view class="color-main fs-28 ell">{{ d.title }}</view>
							<view class="color-main3 fs-24 ell2" style="margin-top: 3rpx;">{{ d.title2 }}</view>
						</view>
					</template>
				</uni-list-item>
			</uni-list>
		</view>
	</view>
</template>

<script>
export default {
	components: {},
	data() {
		return {
			text: ' 爱一朵花，最好的方式就是陪她盛开，会有突如其来的惊喜，始料不及的运气',
			current: 0,
			swiperDotIndex: 0,
			mode: 'dot',
			info: [
				{
					colorClass: 'uni-bg-red',
					url: require('@/static/imgs/banner1.png'),
					content: '内容 A'
				},
				{
					colorClass: 'uni-bg-green',
					url: require('@/static/imgs/banner2.png'),
					content: '内容 B'
				},
				{
					colorClass: 'uni-bg-blue',
					url: require('@/static/imgs/banner3.png'),
					content: '内容 C'
				}
			],
			dotsStyles: {
				backgroundColor: 'rgba(53, 204, 246,0.3)',
				border: '1px rgba(53, 204, 246,0.3) solid',
				color: '#fff',
				selectedBackgroundColor: 'rgba(53, 204, 246,0.9)',
				selectedBorder: '1px rgba(53, 204, 246,0.9) solid'
			},
			imgNotice: require('@/static/imgs/family.png'),
			avatar: require('@/static/imgs/mini.png'),
			specialList: [
				{
					title: '玩具总动员',
					titleTwo: '宝宝摸玩具',
					imgspecial: require('@/static/imgs/yan.png'),
					id: 1
				},
				{
					title: '思考着',
					titleTwo: '宝宝思考问题',
					imgspecial: require('@/static/imgs/yan2.png'),
					id: 2
				},
				{
					title: '星辰大海',
					titleTwo: '宝宝摸星星',
					imgspecial: require('@/static/imgs/yan3.png'),
					id: 3
				}
			],
			intelligenceList: [
				{
					title: '宝宝和妈妈比爱心',
					titleTwo: '白色系列1',
					imgspecial: require('@/static/imgs/w1.png'),
					id: 1
				},
				{
					title: '妈妈亲宝宝',
					titleTwo: '白色系列2',
					imgspecial: require('@/static/imgs/w2.png'),
					id: 2
				},
				{
					title: '宝宝和妈妈一起微笑',
					titleTwo: '白色系列3',
					imgspecial: require('@/static/imgs/w3.png'),
					id: 3
				},
				{
					title: '宝宝在爸爸的肩膀',
					titleTwo: '白色系列4',
					imgspecial: require('@/static/imgs/w4.png'),
					id: 4
				}
			],
			shuList: [
				{
					title: '宝宝和妈妈傻笑',
					imgspecial: require('@/static/imgs/shu1.png'),
					id: 1
				},
				{
					title: '宝宝摸兔兔',
					imgspecial: require('@/static/imgs/shu2.png'),
					id: 2
				},
				{
					title: '宝宝穿衣划船',
					imgspecial: require('@/static/imgs/shu3.png'),
					id: 3
				}
			],
			wanList: [
				{
					title: '你爱我',
					imgspecial: require('@/static/imgs/wanzi1.png'),
					id: 1
				},
				{
					title: '我爱你',
					imgspecial: require('@/static/imgs/wanzi2.png'),
					id: 2
				},
				{
					title: '蜜雪冰城甜蜜蜜',
					imgspecial: require('@/static/imgs/wanzi3.png'),
					id: 3
				}
			],
			moreList: [
				{
					title: '海风轻轻的',
					title2: '趁着夏天,要不要一起去看海',
					imgspecial: require('@/static/imgs/more1.png'),
					id: 1
				},
				{
					title: '大西瓜',
					title2: '想要夏天过得好，西瓜一定不能少，没有一个夏天像今年一样，让人意犹未尽,仿佛这份炽热还留存在心底',
					imgspecial: require('@/static/imgs/more2.png'),
					id: 2
				},
				{
					title: '吃过冰淇淋的人',
					title2: '吃过冰淇淋的人，才算真正拥有夏天',
					imgspecial: require('@/static/imgs/more3.png'),
					id: 3
				}
			]
		};
	},

	methods: {
		focus() {
			uni.navigateTo({
				url: '/pages/serch/serch'
			});
		},
		clickItem(e) {
			this.swiperDotIndex = e;
		},
		change(e) {
			this.current = e.detail.current;
		}
	}
};
</script>
<style lang="scss">
.menu {
	display: flex;
	justify-content: space-between;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
}

.swiper-box {
	height: 200px;
	.swiper-item {
		flex-direction: column;
		justify-content: center;
		align-items: center;
		height: 200px;
		color: red;
	}
	.swiper-item0 {
		background-color: #cee1fd;
	}

	.swiper-item1 {
		background-color: #b2cef7;
	}

	.swiper-item2 {
		background-color: #cee1fd;
	}
}
//从scence拿过来的样式
.imgbox {
	.img {
		width: 100%;
		height: 420rpx;
		border-radius: 12rpx;
		overflow: hidden;
	}
}
.wiki-content {
	.uni-list--base {
		width: 120rpx;
		height: 120rpx;
		border-radius: 10rpx;
	}
	.uni-list-item__content-note {
		margin-top: 20rpx;
		display: inline-block;
		span {
			display: inline-block;
			box-sizing: border-box;
			border: 1px solid #999;
			padding: 1rpx 6rpx;
			border-radius: 6px;
		}
	}
}
.scroll-view_H {
	white-space: nowrap;
	width: 100%;
	background: #fff;
	border-radius: 16rpx;
	padding: 30rpx 10rpx 0;
	box-sizing: border-box;
}
.special-item {
	display: inline-block;
	width: 600rpx;
	height: 460rpx;
	padding: 0 20rpx 60rpx;
	box-sizing: border-box;
	.titleTwo {
		font-size: 14px;
		color: #999;
	}
	.speimg {
		margin-top: 20rpx;
		height: 332rpx;
		width: 100%;
		border-radius: 16rpx;
	}
}
.intelligence-item {
	display: inline-block;
	width: 320rpx;
	height: 460rpx;
	padding: 0 20rpx 60rpx;
	box-sizing: border-box;
	.titleTwo {
		font-size: 16rpx;
		color: #999;
	}
	.speimg {
		margin-top: 20rpx;
		height: 332rpx;
		width: 100%;
		border-radius: 16rpx;
	}
}
.morelist {
	.listbody {
	}
	// .uni-list-item__icon-img {
	// 	width: 180rpx;
	// 	height: 180rpx;
	// 	border-radius: 14rpx;
	// }
	// .uni-list-item__content-title {
	// 	font-size: 32rpx;
	// 	font-weight: bold;
	// }
	// .uni-list-item__content-note {
	// 	display: inline-block;
	// 	word-break: break-all;
	// 	text-overflow: ellipsis;
	// 	display: -webkit-box;
	// 	-webkit-box-orient: vertical;
	// 	-webkit-line-clamp: 2;
	// 	overflow: hidden;
	// 	margin-top: 14rpx;
	// }
}
</style>
